<div id="content" ng-app="SJ-APP" >
    <div class="outer" ng-controller="contest_review_task_list_controller" nv-file-drop="" uploader="uploader" filters="queueLimit, customFilter">
        <div class="inner bg-light lter">
            <div class="row">
                <div class="col-lg-12">
                    <div class="box">
                        <header>
                            <div class="icons">
                                <i class="fa icon-file"></i>
                            </div>
                            <h5><span style="color:#00a1dc;"><a href="@{_contestDetailLink}@" target="_blank">@{contestDetail.title}@</a></span> 评审任务列表</h5>
                        </header>
                        <div id="collapse4" class="body">
                            <div class="row">
                                <div class="col-lg-12">
                                        <header style="display: none;">
                                            <div class="icons"><i class="fa icon-table"></i></div>
                                            <h5>大赛列表</h5>
                                        </header>
                                        <!--Begin Datatables 表格数据 -->
                                        <div id="collapse4" class="body">
                                            <div class="search-form-comp">
                                                <div class="form-horizontal" id="userForm">
                                                    <div class="form-group" style="margin-left: 0">
                                                        <button ng-click="addReviewTask()" class="btn btn-primary col-lg-1" style="background-color: #5bc0de;margin-right: 20px;box-sizing: content-box;-webkit-box-sizing: content-box;-moz-box-sizing: content-box;">添加评审任务</button>
                                                    </div>
                                                </div>
                                            </div>


                                            <table id="dataTable" class="table table-bordered table-condensed table-hover table-striped">
                                                <tbody>
                                                </tbody>
                                            </table>
                                        </div>
                                        <!-- /.row -->


                                    <!--Begin：查看详细信息 -->
                                    <div class="modal fade" id="myModal-task-window" tabindex="-1" role="dialog"
                                         aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog-lg">
                                            <div class="modal-content clearfix">
                                                <div class="modal-header">
                                                    <button type="button" class="close"
                                                            data-dismiss="modal" aria-hidden="true">
                                                        &times;
                                                    </button>
                                                    <h4 class="modal-title" id="modalLabel-task-window">
                                                        添加评审任务
                                                    </h4>
                                                </div>
                                                <div class="modal-body">

                                                    <div class="form-horizontal" id="userForm2">
                                                        <div>
                                                            <!--  left   -->
                                                            <div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-2">评审任务名称</label>
                                                                    <div class="col-lg-5" >
                                                                        <input class="form-control" ng-model="result.title"></input>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-2">评审任务说明</label>
                                                                    <div class="col-lg-5">
                                                                        <textarea class="form-control ng-pristine ng-untouched ng-valid" id='contest-intro' ng-model="result.description"></textarea>
                                                                    </div>
                                                                </div>


                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-2">待评审作品</label>
                                                                    <!--<div class="col-lg-5 control-label" ng-class="{hide: !isEdit}" style="text-align: left">-->
                                                                        <!--<a class="btn btn-metis-6 btn-xs btn-line "  ng-click="exportReviewWorklist()">导出当前待评审作品</a>-->
                                                                    <!--</div>-->
                                                                    <!--ng-class="{hide:isEdit}"-->
                                                                    <div class="col-lg-5" >
                                                                        <div class="radio">
                                                                            <label>
                                                                                <input type="radio" name="optionsRadios" id="optionsRadios1" value="0" ng-model="result.selectType"  ng-checked="result.selectType==0">
                                                                                全部
                                                                            </label>
                                                                            <a class="btn btn-metis-6 btn-xs btn-line" style="margin-left: 10px;" ng-class="{hide: !isEdit || result.selectType==1}" ng-click="exportReviewWorklist()">导出全部作品</a>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <!--<div class="form-group" ng-class="{hide: !isEdit}">-->
                                                                    <!--<label for="cp2" class="control-label col-lg-2"></label>-->
                                                                    <!--<div class="col-lg-5">-->
                                                                        <!--<div class="radio">-->
                                                                            <!--<label>-->
                                                                                <!--<input type="radio" name="optionsRadios" id="optionsRadios1" value="0" ng-model="result.selectType"  ng-checked="result.selectType==0">-->
                                                                                 <!--全部-->
                                                                            <!--</label>-->
                                                                            <!--<a class="btn btn-metis-6 btn-xs btn-line" style="margin-left: 10px;" ng-click="exportReviewWorklist()">导出全部作品</a>-->
                                                                        <!--</div>-->
                                                                    <!--</div>-->
                                                                <!--</div>-->
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-2"></label>
                                                                    <div class="col-lg-9">
                                                                        <div class="radio">
                                                                            <label>
                                                                                <input type="radio" name="optionsRadios" id="optionsRadios1" value="1" ng-model="result.selectType" ng-checked="result.selectType==1">
                                                                                自定义
                                                                            </label>
                                                                            <a class="btn btn-metis-6 btn-xs btn-line" style="margin-left: 10px;" ng-class="{hide:!isEdit || result.selectType==0}" ng-click="exportReviewWorklist()">导出自定义待评审作品</a>
                                                                        </div>
                                                                        <input type="file" class="upload-action-works-review-lxx action-works-review" ng-class="{hide:result.selectType==0}" nv-file-select="" uploader="uploader" />
                                                                        <!-- begin 文件列表-->

                                                                        <div class="col-md-10" ng-class="{hide: result.selectType==0}" style="margin-bottom: 40px">
                                                                            <h3 ng-class="{hide:true}">待上传文件</h3>
                                                                            <p ng-class="{hide:true}">文件个数: @{ uploader.queue.length }@</p>


                                                                            <div class="hide" id="export-iframe-worklist">
                                                                            </div>
                                                                            <table class="table">
                                                                                <thead>
                                                                                <tr>
                                                                                    <th width="40%">文件名</th>
                                                                                    <th  width="15%" ng-show="uploader.isHTML5">大小</th>
                                                                                    <th width="15%" ng-show="uploader.isHTML5">进度</th>
                                                                                    <th width="10%">状态</th>
                                                                                    <th width="30%">操作</th>
                                                                                </tr>
                                                                                </thead>
                                                                                <tbody>
                                                                                <tr ng-repeat="item in uploader.queue">
                                                                                    <td><strong>@{ item.file.name }@</strong></td>
                                                                                    <td ng-show="uploader.isHTML5" nowrap>@{ item.file.size/1024/1024|number:2 }@ MB</td>
                                                                                    <td ng-show="uploader.isHTML5">
                                                                                        <div class="progress" style="margin-bottom: 0;">
                                                                                            <div class="progress-bar" role="progressbar" ng-style="{ 'width': item.progress + '%' }"></div>
                                                                                        </div>
                                                                                    </td>
                                                                                    <td class="text-center">
                                                                                        <span ng-show="item.isSuccess"><i class="glyphicon glyphicon-ok"></i></span>
                                                                                        <span ng-show="item.isCancel"><i class="glyphicon glyphicon-ban-circle"></i></span>
                                                                                        <span ng-show="item.isError"><i class="glyphicon glyphicon-remove"></i></span>
                                                                                    </td>
                                                                                    <td nowrap>
                                                                                        <button type="button" class="btn btn-success btn-xs" ng-click="item.upload()" ng-disabled="item.isReady || item.isUploading || item.isSuccess">
                                                                                            <span class="glyphicon glyphicon-upload"></span> Upload
                                                                                        </button>
                                                                                        <button type="button" class="btn btn-warning btn-xs" ng-click="item.cancel()" ng-disabled="!item.isUploading">
                                                                                            <span class="glyphicon glyphicon-ban-circle"></span> Cancel
                                                                                        </button>
                                                                                        <button type="button" class="btn btn-danger btn-xs" ng-click="item.remove()">
                                                                                            <span class="glyphicon glyphicon-trash"></span> Remove
                                                                                        </button>
                                                                                    </td>
                                                                                </tr>
                                                                                </tbody>
                                                                            </table>

                                                                            <div ng-class="{hide:true}">
                                                                                <div>
                                                                                    队列进度:
                                                                                    <div class="progress" style="">
                                                                                        <div class="progress-bar" role="progressbar" ng-style="{ 'width': uploader.progress + '%' }"></div>
                                                                                    </div>
                                                                                </div>
                                                                                <button type="button" class="btn btn-success btn-s" ng-click="uploader.uploadAll()" ng-disabled="!uploader.getNotUploadedItems().length">
                                                                                    <span class="glyphicon glyphicon-upload"></span> Upload all
                                                                                </button>
                                                                                <button type="button" class="btn btn-warning btn-s" ng-click="uploader.cancelAll()" ng-disabled="!uploader.isUploading">
                                                                                    <span class="glyphicon glyphicon-ban-circle"></span> Cancel all
                                                                                </button>
                                                                                <button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()" ng-disabled="!uploader.queue.length">
                                                                                    <span class="glyphicon glyphicon-trash"></span> Remove all
                                                                                </button>
                                                                            </div>

                                                                        </div>


                                                                        <!-- end 文件列表-->




                                                                        <div class="hide ui-state-default elfinder-button tooltips" title="" data-original-title="上传文件">
                                                                            <input id="filer_input" type="file" name="loadPhoto" multiple="true">
                                                                        </div>
                                                                        <input type="file" class="hide" id="worklist-file"  ng-file-select="onFileSelect($files)" multiple accept="image/*" style="margin-top: 5px;">
                                                                    </div>
                                                                </div>




                                                                <div class="form-group cate-group" ng-repeat="item in result.userId track by $index">
                                                                    <label ng-if="$index ==0" for="cp2" class="control-label col-lg-2">评委/用户 ID</label>
                                                                    <label ng-if="$index !=0" for="cp2" class="control-label col-lg-2"></label>
                                                                    <div class="col-lg-5" >
                                                                        <input class="form-control" ng-model="result.userId[$index]" />
                                                                    </div>
                                                                    <div class="col-lg-1">
                                                                        <button type="button" class="btn btn-default" ng-class="{hide:isEdit}" ng-click="add_rater($index)">+</button>
                                                                    </div>
                                                                    <div class="col-lg-1" ng-if="$index != 0">
                                                                        <button type="button" class="btn btn-default" ng-class="{hide:isEdit}" ng-click="remove_rater($index)">-</button>
                                                                    </div>
                                                                </div>

                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-2">评审启动时间</label>
                                                                    <div class="col-lg-5" >
                                                                        <div class="input-group date form_datetime" id="task-startTime" data-date="12-02-2012" data-date-format="yyyy-mm-dd hh:ii" data-link-field="judge_input_end">
                                                                            <input placeholder="启动时间" type="text" name="reservation" class="form-control" readonly="" ng-model="result.startTime">
                                                                            <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                                                                            <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                                                                        </div>
                                                                    </div>
                                                                </div>
                                                                <div class="form-group">
                                                                    <label for="cp2" class="control-label col-lg-2">评审结束时间</label>
                                                                    <div class="col-lg-5" >
                                                                        <div class="input-group date form_datetime" id="task-endTime" data-date="12-02-2012" data-date-format="yyyy-mm-dd hh:ii" data-link-field="judge_input_end">
                                                                            <input placeholder="结束时间" type="text" name="reservation" class="form-control" readonly="" ng-model="result.endTime">
                                                                            <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                                                                            <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                                                                        </div>
                                                                    </div>
                                                                </div>

                                                                <div class="form-group cate-group" ng-repeat="item in result.tagetList track by $index">
                                                                    <label ng-if="$index ==0" for="cp2" class="control-label col-lg-2">评审目标</label>
                                                                    <label ng-if="$index !=0" for="cp2" class="control-label col-lg-2"></label>
                                                                    <div class="col-lg-3" >
                                                                        <input class="form-control" placeholder="评审目标名称，例：一等奖" ng-model="item.title" />
                                                                    </div>
                                                                    <div class="col-lg-3" >
                                                                        <input class="form-control" placeholder="个数" ng-model="item.tagetCount" />
                                                                    </div>
                                                                    <div class="col-lg-1">
                                                                        <button type="button" class="btn btn-default" ng-click="add_review_target($index)">+</button>
                                                                    </div>
                                                                    <div class="col-lg-1" ng-if="$index != 0">
                                                                        <button type="button" class="btn btn-default" ng-click="remove_review_target($index)">-</button>
                                                                    </div>
                                                                </div>


                                                                <div class="form-group">
                                                                    <div class="checkbox">
                                                                        <label for="cp1" class="control-label col-lg-2">&nbsp;</label>
                                                                        <label class="label-contest-config">
                                                                            <!--ng-checked="@{result.state==100}@"-->
                                                                            <div class="checker"><span class="checked"><input ng-model="result.effect" class="uniform ng-pristine ng-untouched ng-valid" type="checkbox" value="option1"></span></div>暂时不发送任务给评委
                                                                        </label>
                                                                    </div>
                                                                </div>






                                                            </div><!--  /.left  -->



                                                        </div>


                                                    </div>
                                                    <div class="modal-footer">
                                                        <button type="button" class="btn btn-default"
                                                                data-dismiss="modal">关闭
                                                        </button>
                                                        <!--ng-class="{'disabled':(!_orignalTask.effect) && isEdit}"-->
                                                        <button type="button" class="btn btn-primary btn-submit" ng-click="saveReviewTask()">
                                                        保存
                                                        </button>
                                                    </div>
                                                </div><!-- /.modal-content -->
                                            </div>
                                            <!-- /.BODY -->
                                        </div>
                                        <!-- /.box -->
                                    </div>

                                    <!--End 查看详细信息 -->



                                    <!--Begin：查看评审结果 -->
                                    <div class="modal fade" id="myModal-review-result-set" tabindex="-1" role="dialog"
                                         aria-labelledby="myModalLabel" aria-hidden="true">
                                        <div class="modal-dialog-lg" style="width: 1000px;">
                                            <div class="modal-content clearfix">
                                                <div class="modal-header">
                                                    <button type="button" class="close"
                                                            data-dismiss="modal" aria-hidden="true">
                                                        &times;
                                                    </button>
                                                    <h4 class="modal-title" id="myModalLabel-work-name">
                                                        <a href="@{host}@/page/contestv/views/index?id=@{contestDetail.id}@&r=@{contestDetail.refer}@&p=index" target="_blank">@{contestDetail.title}@</a>评审--@{sjApp.htmldecode(_curTask.userName)}@评委
                                                    </h4>

                                                </div>
                                                <div class="modal-body">
                                                    <div class="form-horizontal">
                                                        <div class="form-group">
                                                            <div class="col-lg-2">
                                                                <select class="form-control ng-pristine ng-untouched ng-valid" ng-model="searchParamsObj" ng-options="x as x.title for x in _curTask.tagetList" ng-change="getReviewResult()">
                                                                </select>
                                                            </div>

                                                            <button ng-click="exportReviewResult()" class="btn btn-primary" style="background-color: #00b7ef">导出数据</button>
                                                            <div class="hide" id="export-iframe">
                                                            </div>
                                                        </div>
                                                    </div>

                                                    <table id="dataTable-review-list" class="table table-bordered table-condensed table-hover table-striped">
                                                        <tbody>
                                                        </tbody>
                                                    </table>

                                                    <div class="modal-footer">
                                                        <button type="button" class="btn btn-default"
                                                                data-dismiss="modal" >关闭
                                                        </button>
                                                        <!--<button type="button" class="btn btn-primary btn-submit" ng-click="">-->
                                                        <!--保存-->
                                                        <!--</button>-->
                                                    </div>
                                                </div><!-- /.modal-content -->
                                            </div>
                                            <!-- /.BODY -->
                                        </div>
                                        <!-- /.box -->
                                    </div>

                                    <!--End 奖项设置 -->










                                </div>
                            </div>










                        </div>
                    </div>
                </div>


            <link rel="stylesheet" href="/lib/bootstrap-tagsinput-master/src/bootstrap-tagsinput.css">
            <link rel="stylesheet" href="/lib/bootstrap-datetimepicker-master/css/bootstrap-datetimepicker.css">
            <link href="/lib/jQuery.filer-master/css/jquery.filer.css" rel="stylesheet">

            <script type="text/javascript" src="/js/angular.min.js"></script>

            <script type="text/javascript" src="/js/app.js"></script>
            <script src="/lib/jQuery.filer-master/js/jquery.filer.js"></script>

            <!--另外一个文件上传的插件-->
            <script src="/js/angular-file-upload-master/dist/angular-file-upload.min.js"></script>




            <link rel="stylesheet" href="/css/admin/css/file-manager.css"/>


            <link rel="stylesheet" href="/css/contest/main.css"/>



            <link rel="stylesheet"
                  href="/contest_public/assets/lib/dataTables/css/dataTables.bootstrap.css"/>
            <script src="/contest_public/assets/lib/dataTables/js/jquery.dataTables.js" type="text/javascript"></script>
            <script src="/contest_public/assets/lib/dataTables/js/dataTables.bootstrap.js" type="text/javascript"></script>
            <script type="text/javascript" src="http://shijue.me/lib/bootstrap-datetimepicker-master/js/bootstrap-datetimepicker.js"></script>
            <script type="text/javascript" src="/js/contest/review_task_list.js"></script>

            </div><!-- /.row -->
        </div>
    </div><!-- /.outer -->
</div><!-- /#content -->